package com.kvest.sqlitetest;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import com.kvest.sqlitetest.datastorage.sqlitestorage.MultithreadingSQLiteManager;

/**
 * Created with IntelliJ IDEA.
 * User: Kvest
 * Date: 07.07.13
 * Time: 11:21
 * To change this template use File | Settings | File Templates.
 */
public class StartActivity extends Activity {
    @Override
    public void onCreate(Bundle savedState) {
        super.onCreate(savedState);
        setContentView(R.layout.start);

        MultithreadingSQLiteManager.getInstance().init(getApplicationContext());
    }

    public void onShowSQLTestActivity(View view) {
        startActivity(new Intent(this, MainActivity.class));
    }

    public void onShowContentProviderActivity(View view) {
        startActivity(new Intent(this, ContentProviderActivity.class));
    }

    @Override
    public void onPause() {
        super.onPause();

        if (isFinishing()) {
            MultithreadingSQLiteManager.getInstance().close();
        }
    }
}
